/**
 * 文档转换工具类型定义
 */

export interface ConversionResult {
  success: boolean;
  outputPath: string;
  size: number;
  message: string;
}

export interface ConversionError {
  success: false;
  error: Error;
}

export interface BatchConversionResult {
  pdf: ConversionResult | ConversionError;
  docx: ConversionResult | ConversionError;
  success: boolean;
}

export interface PdfOptions {
  format?: 'A4' | 'A3' | 'A5' | 'Letter' | 'Legal';
  margin?: {
    top?: string;
    right?: string;
    bottom?: string;
    left?: string;
  };
  displayHeaderFooter?: boolean;
  printBackground?: boolean;
  preferCSSPageSize?: boolean;
  landscape?: boolean;
}

export interface DocxOptions {
  title?: string;
  creator?: string;
  description?: string;
  chineseFont?: string;
  englishFont?: string;
  codeFont?: string;
  fontSize?: number;
  headingColor?: string;
  linkColor?: string;
  mermaidWidth?: number;
  mermaidHeight?: number;
}

export interface ConverterOptions {
  chineseFont?: string;
  mermaidTheme?: 'default' | 'dark' | 'forest' | 'neutral';
  outputDir?: string;
  pdf?: PdfOptions;
  docx?: DocxOptions;
}

export interface ConversionOptions {
  title?: string;
  [key: string]: any;
}

export interface BatchConversionOptions {
  pdf?: ConversionOptions;
  docx?: ConversionOptions;
}
